package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.AutoFill;
import com.ruoyi.common.enums.AutoFillType;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DispatchEnergyConsumptionStatsMapper;
import com.ruoyi.system.domain.DispatchEnergyConsumptionStats;
import com.ruoyi.system.service.IDispatchEnergyConsumptionStatsService;

/**
 * 能耗统计结果Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-02
 */
@Service
public class DispatchEnergyConsumptionStatsServiceImpl implements IDispatchEnergyConsumptionStatsService 
{
    @Autowired
    private DispatchEnergyConsumptionStatsMapper dispatchEnergyConsumptionStatsMapper;

    /**
     * 查询能耗统计结果
     * 
     * @param energyConsumptionStatsId 能耗统计结果主键
     * @return 能耗统计结果
     */
    @Override
    public DispatchEnergyConsumptionStats selectDispatchEnergyConsumptionStatsByEnergyConsumptionStatsId(Long energyConsumptionStatsId)
    {
        return dispatchEnergyConsumptionStatsMapper.selectDispatchEnergyConsumptionStatsByEnergyConsumptionStatsId(energyConsumptionStatsId);
    }

    /**
     * 查询能耗统计结果列表
     * 
     * @param dispatchEnergyConsumptionStats 能耗统计结果
     * @return 能耗统计结果
     */
    @Override
    public List<DispatchEnergyConsumptionStats> selectDispatchEnergyConsumptionStatsList(DispatchEnergyConsumptionStats dispatchEnergyConsumptionStats)
    {
        return dispatchEnergyConsumptionStatsMapper.selectDispatchEnergyConsumptionStatsList(dispatchEnergyConsumptionStats);
    }

    /**
     * 新增能耗统计结果
     * 
     * @param dispatchEnergyConsumptionStats 能耗统计结果
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.INSERT)
    @Override
    public int insertDispatchEnergyConsumptionStats(DispatchEnergyConsumptionStats dispatchEnergyConsumptionStats)
    {
        return dispatchEnergyConsumptionStatsMapper.insertDispatchEnergyConsumptionStats(dispatchEnergyConsumptionStats);
    }

    /**
     * 修改能耗统计结果
     * 
     * @param dispatchEnergyConsumptionStats 能耗统计结果
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.UPDATE)
    @Override
    public int updateDispatchEnergyConsumptionStats(DispatchEnergyConsumptionStats dispatchEnergyConsumptionStats)
    {
        return dispatchEnergyConsumptionStatsMapper.updateDispatchEnergyConsumptionStats(dispatchEnergyConsumptionStats);
    }

    /**
     * 批量删除能耗统计结果
     * 
     * @param energyConsumptionStatsIds 需要删除的能耗统计结果主键
     * @return 结果
     */
    @Override
    public int deleteDispatchEnergyConsumptionStatsByEnergyConsumptionStatsIds(Long[] energyConsumptionStatsIds)
    {
        return dispatchEnergyConsumptionStatsMapper.deleteDispatchEnergyConsumptionStatsByEnergyConsumptionStatsIds(energyConsumptionStatsIds);
    }

    /**
     * 删除能耗统计结果信息
     * 
     * @param energyConsumptionStatsId 能耗统计结果主键
     * @return 结果
     */
    @Override
    public int deleteDispatchEnergyConsumptionStatsByEnergyConsumptionStatsId(Long energyConsumptionStatsId)
    {
        return dispatchEnergyConsumptionStatsMapper.deleteDispatchEnergyConsumptionStatsByEnergyConsumptionStatsId(energyConsumptionStatsId);
    }
}
